	
		<script type="text/javascript" src="{{__PUBLIC__}}/Home/js/jquery-1.8.2.min.js"></script>
	</head>
	<body>
			<!--顶部-->
		<div class="top">
			<div class="top-1">
				<ul class="top-2-1">
					<li class="t-l-1"><a href="http://www.huawei.com/cn/">华为官网</a></li>
					<span></span>
					<li><a href="index.php?m=Home&c=Content&a=index&gid=6&cid=1">华为荣耀</a></li>
					
				</ul>
				<ul class="top-2-2">
					{{if value="(isset($_SESSION['username']))"}}
						{{if value="(isset($_SESSION['neckname']))"}}
							<li>欢迎<a href="{{U('User/index')}}" class="t-l-f" style="color:red;">&nbsp;{{$_SESSION['neckname']}}&nbsp;</a>回来&nbsp;&nbsp;<a href="{{U('Login/out')}}" class="t-l-f">退出</a></li>
						{{else}}
							<li>欢迎<a href="{{U('User/index')}}" class="t-l-f" style="color:red;">&nbsp;{{$_SESSION['username']}}&nbsp;</a>回来&nbsp;&nbsp;<a href="{{U('Login/out')}}" class="t-l-f">退出</a></li>
						{{endif}}
					{{else}}
					<li><a href="{{U('Login/index')}}" class="t-l-f">登陆</a>&nbsp;&nbsp;<a href="{{U('Register/index')}}" class="t-l-f">注册</a></li>
					{{endif}}
					<span></span>
					<li><a href="{{U('User/index')}}">我的订单</a></li>
					
				</ul>
			</div>
		</div>
			<!--头部-->
		<div class="head">
			<div class="logo">
				<a href="{{U('Index/index')}}">
					<img src="{{__PUBLIC__}}/Home/images/newLogo.png" alt="" />
				</a>
			</div>
			<div class="searchBar">
				<div class="searchBar-area">
					<form action="" method="get">
					<input type="text" id="s-in" value="荣耀6 Plus" width="100" />
					<input type="submit" class="sub-in" value="搜索" />
					</form>
				</div>
				<div class="search-key">
					<?php $dataAll = Db::table("goods")->orderBy("click",'DESC')->limit(4)->get();
        				View::with('dataAll',$dataAll); 
        			?>
					<b>热门搜索：</b>
					{{foreach from="$dataAll" key="$k" value="$vd"}}
						<a href="{{U('Content/index',array('gid'=>$vd['gid'],'cid'=>$vd['category_cid']))}}"><?php echo mb_substr($vd['gname'],0,6,'UTF-8') ?></a>
					{{endforeach}}
				</div>
			</div>
			<div class="head-tool">
				<div class="head-t-l">
					<div class="my-mall">
						<div class="m-x">
							<a href="{{U('Index/index')}}">我的商城</a>
							<i></i>
						</div>
						<div class="m-h">
							<div class="m-login">
								{{if value="(isset($_SESSION['username']))"}}
									{{if value="(isset($_SESSION['neckname']))"}}
										<p><a href="{{U('User/users')}}">{{$_SESSION['neckname']}}</a></p>
									{{else}}
										<p><a href="{{U('User/users')}}">{{$_SESSION['username']}}</a></p>
									{{endif}}
								{{else}}
									<p>你好，请<a href="">登录</a><span></span><a href="">注册</a></p>
								{{endif}}
							</div>
							<div class="m-item">
								<ul>
									<li class="m-ge"><a href="{{U('User/index')}}">我的订单</a></li>
									<li><a href="index.php?m=Home&c=User&a=index&n=2">待支付</a></li>
									<li class="m-ge"><a href="index.php?m=Home&c=User&a=index&n=3">待收货</a></li>
								</ul>
							</div>
							<div class="m-img">
								<a href=""><img src="{{__PUBLIC__}}/Home/images/20151117095513825.jpg" /></a>
							</div>
						</div>
					</div>
				</div>
				<i></i>
				<div class="head-t-r">
					<span id="header-cart-total">
					<?php if(isset($_SESSION['cart']['total_rows'])): ?>
						{{$_SESSION['cart']['total_rows']}}
					<?php else: ?>
						0
					<?php endif ?>
					</span>
					<div class="my-mall">
						<div class="m-x">
							<a href="{{U('OrderList/index')}}">我的购物车</a>
							<i></i>
						</div>
						<?php if(isset($_SESSION['cart']['total_rows'])): ?>
						<div class="m-h">
							<div class="my-cart">
								<ul>
									{{foreach from="$_SESSION['cart']['goods']" key="$k" value="$vc"}}
										<li>
											<div class="hot-sale">
												<a href=""><img style="width:100px;height:100px;" src="{{__ROOT__}}/{{$vc['img']}}"/></a>
												<p class="p-info-hot"><a href=""><?php echo mb_substr($vc['name'],0,14,'UTF-8') ?></a></p>
												<p class="p-price-hot"><em>￥</em><span>{{$vc['price']}}</span>&nbsp;<em>X</em>&nbsp;<span>{{$vc['num']}}</span></p>
												<a href="javascript:;" class="del" onclick="if(confirm('确定删除吗？')) location.href='{{U('OrderList/del',array('k'=>$k))}}'">X</a>
											</div>
										</li>
									{{endforeach}}
									<li class="heji">共&nbsp;&nbsp;<span class="shu">{{$_SESSION['cart']['total_rows']}}</span>&nbsp;&nbsp;件商品,金额合计&nbsp;&nbsp;<span class="zong">￥{{$_SESSION['cart']['total']}}</span><a href="{{U('OrderList/index')}}" class="go-pay">去结算</a></li>
								</ul>
							</div>
						</div>
						<?php else: ?>
							<div class="m-h-2">
								<i class="kong"><p>您的购物车是空的，赶紧选购吧！</p></i>
							</div>
						<?php endif ?>
					</div>
				</div>
			</div>
			<div class="head-wxcode"></div>
		</div>
			<!--导航-->
			<?php 
				$getModel = new \Admin\Model\Cate;
				$cate = $getModel->catedata(); 
			 ?>
		<div class="nav">
			<div class="nav-1">
				<div class="nav-l">
					<p>全部商品</p>
					<div class="slider">
						<ul class="slider-one">
							{{foreach from="$cate" value="$v"}}
								<li class="slider-one-1">
									<a href="{{U('Lists/index',array('cid'=>$v['cid']))}}" class="s-dt">{{$v['cname']}}</a>
									{{list from="$v['son']" name="$vv" row="3"}}
									<a href="{{U('Lists/index',array('cid'=>$vv['cid']))}}">{{$vv['cname']}}</a>
									{{endlist}}
									<div class="slider-two">
										<ul class="slider-two-2">
										{{foreach from="$v['son']" value="$vt"}}
											<li><a href="{{U('Lists/index',array('cid'=>$vt['cid']))}}">{{$vt['cname']}}</a></li>
										{{endforeach}}
										</ul>
										<dl>
											<dt><span>推荐商品</span></dt>
											{{foreach from="$dataAll" key="$k" value="$vd"}}
											<dd><a href="{{U('Content/index',array('gid'=>$vd['gid'],'cid'=>$vd['category_cid']))}}"><?php echo mb_substr($vd['gname'],0,6,'UTF-8') ?></a></dd>
											{{endforeach}}
										</dl>
									</div>
								</li>
							{{endforeach}}
						</ul>
					</div>
				</div>
				<div class="nav-r">
					 <ul>
					 	<li class="nav-r-1"><a href="{{U('Index/index')}}">首  页</a></li>
					 	{{foreach from="$cate" value="$v"}}
					 		<li><a href="{{U('Lists/index',array('cid'=>$v['cid']))}}">{{$v['cname']}}</a></li>
					 	{{endforeach}}
					 </ul>
				</div>
			</div>
		</div>